<template>
<el-row class="tac">
    
    <el-col :span="20">
      <el-menu
        class="el-menu-vertical-demo"
        @open="handleOpen"
        @close="handleClose"
        background-color="#545c64"
        text-color="#fff">
        
        <el-menu-item index="1"  @click="handleNavigate('/home')">
          <i class="el-icon-menu"></i>
          <span slot="title">用户管理</span>
        </el-menu-item>

        <el-menu-item index="2" @click="handleNavigate('/wz')">
          <i class="el-icon-setting"></i>
          <span slot="title">文章管理</span>
        </el-menu-item>
      </el-menu>
    </el-col>
  </el-row>
</template>
  
  <script>
    import router from '@/router';
import { useRouter } from 'vue-router';
    export default {
        
      methods: {
        handleOpen(key, keyPath) {
          console.log(key, keyPath);
        },
        handleClose(key, keyPath) {
          console.log(key, keyPath);
        },
        handleNavigate(route){
            router.push(route)
        }
      }
    }
  </script>
